import java.util.Stack;

public class Tower {

	Stack<Disk> stack;
	char name;
	
	public Tower(char nm) {
		stack= new Stack<Disk>();
		name=nm;
	}
	
	public void push(Disk d){
		 stack.push(d);
	}
	
	public Disk pop() {
		return stack.pop();
	}
	
	public short getSize() {
		return (short)stack.size();
	}
	
	public boolean isEmpty() {
		return stack.isEmpty();
	}
	
	public Disk getElement(int i) {
		return stack.elementAt(i);
	}
	
	public String toString(){
		String cad="";
		for (int i = 0; i < stack.size(); i++) {
			cad+=stack.elementAt(i).size+", ";
		}
		return cad;
	}
}
